<?php
/**
 * Created by JetBrains PhpStorm.
 * User: developerphp
 * Date: 9/27/12
 * Time: 11:10 AM
 * To change this template use File | Settings | File Templates.
 */


class  Page_Be_Test extends Page {

	/**
	 * @var Db_Test
	 */
	protected $tableObject;

	function __construct(){
		//	$this->classTableObject = 'Db_Test';
		parent::__construct();
	}

	public function defaultAction() {
		var_dump(Utils::generateSiteMap('wedding', 1, true));
		exit;

		self::$TPL->setBodyTemplate("test");
		//$list = Db_Cms_Pages::getPagesForSitemap('admin');
		$list = Db_Cms_PagePagination::getProductsUrlsByPageId(871, 'admin');

		self::$TPL->assign('list', $list);
		return array (
			'type'=> 'display'
		);
	}

	public function formHandlerAction() {
		print_r('<pre>');
		print_r($_FILES);
		//exit;
		//$arrayFile = array();
		$arrayFile = $_FILES['file'];
		//$arrayFile[] = $_FILES['file2'];

		$allowedExtensions = conf('ALLOWED_EXTENSIONS');
		$result = Utils::uploadFile($arrayFile, PRODUCTS_PHOTOS_PRODUCT_PATH, 301, $allowedExtensions['users'], false, 5478597879879, true);
		print_r($result);
		exit;
	}
}
